Optimal. Leaf size=278 \[ -\frac {\sqrt {d} \text {ArcTan}\left (\frac {\sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 a^2 f}-\frac {\sqrt {d} \text {ArcTan}\left (1-\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 \sqrt {2} a^2 f}+\frac {\sqrt {d} \text {ArcTan}\left (1+\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 \sqrt {2} a^2 f}-\frac {\sqrt {d} \log \left (\sqrt {d}+\sqrt {d} \tan (e+f x)-\sqrt {2} \sqrt {d \tan (e+f x)}\right )}{4 \sqrt {2} a^2 f}+\frac {\sqrt {d} \log \left (\sqrt {d}+\sqrt {d} \tan (e+f x)+\sqrt {2} \sqrt {d \tan (e+f x)}\right )}{4 \sqrt {2} a^2 f}-\frac {\sqrt {d \tan (e+f x)}}{2 f \left (a^2+a^2 \tan (e+f x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.32, antiderivative size = 278, normalized size of antiderivative = 1.00, number of steps
used = 17, number of rules used = 14, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.560, Rules used = {3649, 3734,
12, 3557, 335, 217, 1179, 642, 1176, 631, 210, 3715, 65, 211} \begin {gather*} -\frac {\sqrt {d} \text {ArcTan}\left (\frac {\sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 a^2 f}-\frac {\sqrt {d} \text {ArcTan}\left (1-\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 \sqrt {2} a^2 f}+\frac {\sqrt {d} \text {ArcTan}\left (\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}+1\right )}{2 \sqrt {2} a^2 f}-\frac {\sqrt {d \tan (e+f x)}}{2 f \left (a^2 \tan (e+f x)+a^2\right )}-\frac {\sqrt {d} \log \left (\sqrt {d} \tan (e+f x)-\sqrt {2} \sqrt {d \tan (e+f x)}+\sqrt {d}\right )}{4 \sqrt {2} a^2 f}+\frac {\sqrt {d} \log \left (\sqrt {d} \tan (e+f x)+\sqrt {2} \sqrt {d \tan (e+f x)}+\sqrt {d}\right )}{4 \sqrt {2} a^2 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 65
Rule 210
Rule 211
Rule 217
Rule 335
Rule 631
Rule 642
Rule 1176
Rule 1179
Rule 3557
Rule 3649
Rule 3715
Rule 3734
Rubi steps
\begin {align*} \int \frac {\sqrt {d \tan (e+f x)}}{(a+a \tan (e+f x))^2} \, dx &=-\frac {\sqrt {d \tan (e+f x)}}{2 f \left (a^2+a^2 \tan (e+f x)\right )}-\frac {\int \frac {-\frac {a d}{2}-a d \tan (e+f x)+\frac {1}{2} a d \tan ^2(e+f x)}{\sqrt {d \tan (e+f x)} (a+a \tan (e+f x))} \, dx}{2 a^2}\\ &=-\frac {\sqrt {d \tan (e+f x)}}{2 f \left (a^2+a^2 \tan (e+f x)\right )}-\frac {\int -\frac {2 a^2 d}{\sqrt {d \tan (e+f x)}} \, dx}{4 a^4}-\frac {d \int \frac {1+\tan ^2(e+f x)}{\sqrt {d \tan (e+f x)} (a+a \tan (e+f x))} \, dx}{4 a}\\ &=-\frac {\sqrt {d \tan (e+f x)}}{2 f \left (a^2+a^2 \tan (e+f x)\right )}+\frac {d \int \frac {1}{\sqrt {d \tan (e+f x)}} \, dx}{2 a^2}-\frac {d \text {Subst}\left (\int \frac {1}{\sqrt {d x} (a+a x)} \, dx,x,\tan (e+f x)\right )}{4 a f}\\ &=-\frac {\sqrt {d \tan (e+f x)}}{2 f \left (a^2+a^2 \tan (e+f x)\right )}-\frac {\text {Subst}\left (\int \frac {1}{a+\frac {a x^2}{d}} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{2 a f}+\frac {d^2 \text {Subst}\left (\int \frac {1}{\sqrt {x} \left (d^2+x^2\right )} \, dx,x,d \tan (e+f x)\right )}{2 a^2 f}\\ &=-\frac {\sqrt {d} \tan ^{-1}\left (\frac {\sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 a^2 f}-\frac {\sqrt {d \tan (e+f x)}}{2 f \left (a^2+a^2 \tan (e+f x)\right )}+\frac {d^2 \text {Subst}\left (\int \frac {1}{d^2+x^4} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{a^2 f}\\ &=-\frac {\sqrt {d} \tan ^{-1}\left (\frac {\sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 a^2 f}-\frac {\sqrt {d \tan (e+f x)}}{2 f \left (a^2+a^2 \tan (e+f x)\right )}+\frac {d \text {Subst}\left (\int \frac {d-x^2}{d^2+x^4} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{2 a^2 f}+\frac {d \text {Subst}\left (\int \frac {d+x^2}{d^2+x^4} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{2 a^2 f}\\ &=-\frac {\sqrt {d} \tan ^{-1}\left (\frac {\sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 a^2 f}-\frac {\sqrt {d \tan (e+f x)}}{2 f \left (a^2+a^2 \tan (e+f x)\right )}-\frac {\sqrt {d} \text {Subst}\left (\int \frac {\sqrt {2} \sqrt {d}+2 x}{-d-\sqrt {2} \sqrt {d} x-x^2} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{4 \sqrt {2} a^2 f}-\frac {\sqrt {d} \text {Subst}\left (\int \frac {\sqrt {2} \sqrt {d}-2 x}{-d+\sqrt {2} \sqrt {d} x-x^2} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{4 \sqrt {2} a^2 f}+\frac {d \text {Subst}\left (\int \frac {1}{d-\sqrt {2} \sqrt {d} x+x^2} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{4 a^2 f}+\frac {d \text {Subst}\left (\int \frac {1}{d+\sqrt {2} \sqrt {d} x+x^2} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{4 a^2 f}\\ &=-\frac {\sqrt {d} \tan ^{-1}\left (\frac {\sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 a^2 f}-\frac {\sqrt {d} \log \left (\sqrt {d}+\sqrt {d} \tan (e+f x)-\sqrt {2} \sqrt {d \tan (e+f x)}\right )}{4 \sqrt {2} a^2 f}+\frac {\sqrt {d} \log \left (\sqrt {d}+\sqrt {d} \tan (e+f x)+\sqrt {2} \sqrt {d \tan (e+f x)}\right )}{4 \sqrt {2} a^2 f}-\frac {\sqrt {d \tan (e+f x)}}{2 f \left (a^2+a^2 \tan (e+f x)\right )}+\frac {\sqrt {d} \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 \sqrt {2} a^2 f}-\frac {\sqrt {d} \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 \sqrt {2} a^2 f}\\ &=-\frac {\sqrt {d} \tan ^{-1}\left (\frac {\sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 a^2 f}-\frac {\sqrt {d} \tan ^{-1}\left (1-\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 \sqrt {2} a^2 f}+\frac {\sqrt {d} \tan ^{-1}\left (1+\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 \sqrt {2} a^2 f}-\frac {\sqrt {d} \log \left (\sqrt {d}+\sqrt {d} \tan (e+f x)-\sqrt {2} \sqrt {d \tan (e+f x)}\right )}{4 \sqrt {2} a^2 f}+\frac {\sqrt {d} \log \left (\sqrt {d}+\sqrt {d} \tan (e+f x)+\sqrt {2} \sqrt {d \tan (e+f x)}\right )}{4 \sqrt {2} a^2 f}-\frac {\sqrt {d \tan (e+f x)}}{2 f \left (a^2+a^2 \tan (e+f x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.42, size = 192, normalized size = 0.69 \begin {gather*} \frac {\left (-\frac {2 \cos (e+f x)}{\cos (e+f x)+\sin (e+f x)}-\frac {2 \sqrt {2} \text {ArcTan}\left (1-\sqrt {2} \sqrt {\tan (e+f x)}\right )-2 \sqrt {2} \text {ArcTan}\left (1+\sqrt {2} \sqrt {\tan (e+f x)}\right )+4 \text {ArcTan}\left (\sqrt {\tan (e+f x)}\right )+\sqrt {2} \log \left (-1+\sqrt {2} \sqrt {\tan (e+f x)}-\tan (e+f x)\right )-\sqrt {2} \log \left (1+\sqrt {2} \sqrt {\tan (e+f x)}+\tan (e+f x)\right )}{2 \sqrt {\tan (e+f x)}}\right ) \sqrt {d \tan (e+f x)}}{4 a^2 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.18, size = 200, normalized size = 0.72
method | result | size |
derivativedivides | \(\frac {2 d^{3} \left (-\frac {\frac {\sqrt {d \tan \left (f x +e \right )}}{2 d \left (d \tan \left (f x +e \right )+d \right )}+\frac {\arctan \left (\frac {\sqrt {d \tan \left (f x +e \right )}}{\sqrt {d}}\right )}{2 d^{\frac {3}{2}}}}{2 d}+\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{16 d^{3}}\right )}{f \,a^{2}}\) | \(200\) |
default | \(\frac {2 d^{3} \left (-\frac {\frac {\sqrt {d \tan \left (f x +e \right )}}{2 d \left (d \tan \left (f x +e \right )+d \right )}+\frac {\arctan \left (\frac {\sqrt {d \tan \left (f x +e \right )}}{\sqrt {d}}\right )}{2 d^{\frac {3}{2}}}}{2 d}+\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{16 d^{3}}\right )}{f \,a^{2}}\) | \(200\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 227, normalized size = 0.82 \begin {gather*} -\frac {\frac {4 \, \sqrt {d \tan \left (f x + e\right )} d^{2}}{a^{2} d \tan \left (f x + e\right ) + a^{2} d} + \frac {4 \, d^{\frac {3}{2}} \arctan \left (\frac {\sqrt {d \tan \left (f x + e\right )}}{\sqrt {d}}\right )}{a^{2}} - \frac {2 \, \sqrt {2} d^{\frac {3}{2}} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right ) + 2 \, \sqrt {2} d^{\frac {3}{2}} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right ) + \sqrt {2} d^{\frac {3}{2}} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right ) - \sqrt {2} d^{\frac {3}{2}} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{a^{2}}}{8 \, d f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 841 vs.
\(2 (223) = 446\).
time = 1.36, size = 1763, normalized size = 6.34 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\sqrt {d \tan {\left (e + f x \right )}}}{\tan ^{2}{\left (e + f x \right )} + 2 \tan {\left (e + f x \right )} + 1}\, dx}{a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.65, size = 260, normalized size = 0.94 \begin {gather*} \frac {\frac {2 \, \sqrt {2} d \sqrt {{\left | d \right |}} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {{\left | d \right |}} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {{\left | d \right |}}}\right )}{a^{2} f} + \frac {2 \, \sqrt {2} d \sqrt {{\left | d \right |}} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {{\left | d \right |}} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {{\left | d \right |}}}\right )}{a^{2} f} + \frac {\sqrt {2} d \sqrt {{\left | d \right |}} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {{\left | d \right |}} + {\left | d \right |}\right )}{a^{2} f} - \frac {\sqrt {2} d \sqrt {{\left | d \right |}} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {{\left | d \right |}} + {\left | d \right |}\right )}{a^{2} f} - \frac {4 \, d^{\frac {3}{2}} \arctan \left (\frac {\sqrt {d \tan \left (f x + e\right )}}{\sqrt {d}}\right )}{a^{2} f} - \frac {4 \, \sqrt {d \tan \left (f x + e\right )} d^{2}}{{\left (d \tan \left (f x + e\right ) + d\right )} a^{2} f}}{8 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.58, size = 367, normalized size = 1.32 \begin {gather*} -\frac {\mathrm {atan}\left (\frac {4\,d^{12}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}\,{\left (-\frac {d^2}{a^8\,f^4}\right )}^{1/4}}{\frac {4\,d^{13}}{a^2\,f}-4\,a^2\,d^{12}\,f\,\sqrt {-\frac {d^2}{a^8\,f^4}}}+\frac {4\,d^{11}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}\,{\left (-\frac {d^2}{a^8\,f^4}\right )}^{3/4}}{\frac {4\,d^{13}}{a^6\,f^3}-\frac {4\,d^{12}\,\sqrt {-\frac {d^2}{a^8\,f^4}}}{a^2\,f}}\right )\,{\left (-\frac {d^2}{a^8\,f^4}\right )}^{1/4}}{2}-\mathrm {atan}\left (\frac {d^{12}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}\,{\left (-\frac {d^2}{256\,a^8\,f^4}\right )}^{1/4}\,16{}\mathrm {i}}{\frac {4\,d^{13}}{a^2\,f}+64\,a^2\,d^{12}\,f\,\sqrt {-\frac {d^2}{256\,a^8\,f^4}}}-\frac {d^{11}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}\,{\left (-\frac {d^2}{256\,a^8\,f^4}\right )}^{3/4}\,256{}\mathrm {i}}{\frac {4\,d^{13}}{a^6\,f^3}+\frac {64\,d^{12}\,\sqrt {-\frac {d^2}{256\,a^8\,f^4}}}{a^2\,f}}\right )\,{\left (-\frac {d^2}{256\,a^8\,f^4}\right )}^{1/4}\,2{}\mathrm {i}-\frac {d\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{2\,\left (a^2\,d\,f+a^2\,d\,f\,\mathrm {tan}\left (e+f\,x\right )\right )}+\frac {\sqrt {-d}\,\mathrm {atan}\left (\frac {\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}\,1{}\mathrm {i}}{\sqrt {-d}}\right )\,1{}\mathrm {i}}{2\,a^2\,f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________